package com.k2data.test.parameterized;

import org.junit.jupiter.api.extension.ParameterContext;
import org.junit.jupiter.params.aggregator.ArgumentsAccessor;
import org.junit.jupiter.params.aggregator.ArgumentsAggregationException;
import org.junit.jupiter.params.aggregator.ArgumentsAggregator;

/**
 * ArgumentsAggregator
 * @author wangchuan 2019-01-28
 *
 */
public class PointAggregator implements ArgumentsAggregator{

	@Override
	public Object aggregateArguments(ArgumentsAccessor accessor, ParameterContext context)
			throws ArgumentsAggregationException {
		return new Point(accessor.getDouble(1), accessor.getDouble(2));
	}

}
